import 'package:fluro/fluro.dart';
import 'package:flutter/material.dart';
// 页面
import './request_test.dart';
import './permission_test.dart';
import './notification_push_test.dart';

class CommonPageRouteMap {
  final String requestTest = 'request_test';
  final String permissionTest = 'permission_test';
  final String notificationPushTest = 'notification_push_test';

  static void Function(FluroRouter) define = handleDefine;
}

void handleDefine(FluroRouter router) {
  CommonPageRouteMap routeMap = CommonPageRouteMap();

  router.define(
    routeMap.requestTest,
    handler: Handler(
      handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
        return RequestTest();
      },
    ),
  );

  router.define(
    routeMap.permissionTest,
    handler: Handler(
      handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
        return PermissionTest();
      },
    ),
  );

  router.define(
    routeMap.notificationPushTest,
    handler: Handler(
      handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
        return NotificationPushTest();
      },
    ),
  );
}
